import { IPSDEUILogicLinkCond } from './ipsdeuilogic-link-cond';
import { IPSDEUILogicLinkGroupCond } from './ipsdeuilogic-link-group-cond';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEUILogicLinkGroupCondImpl extends PSModelObjectImpl implements IPSDEUILogicLinkGroupCond {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get groupOP(): 'AND' | 'OR' {
    return this.M.groupOP;
  }

  get logicType(): 'GROUP' | 'SINGLE' {
    return this.M.logicType;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  protected psdeuilogiclinkconds: IPSDEUILogicLinkCond[] | null = null;

  getPSDEUILogicLinkConds(): IPSDEUILogicLinkCond[] | null {
    if (this.psdeuilogiclinkconds == null) {
      this.psdeuilogiclinkconds = this.fillChildListModel(this.M.getPSDEUILogicLinkConds, 'dataentity.logic.IPSDEUILogicLinkCond') as IPSDEUILogicLinkCond[];
    }
    return this.psdeuilogiclinkconds;
  }

  get psDEUILogicLinkConds(): IPSDEUILogicLinkCond[] | null {
    return this.getPSDEUILogicLinkConds();
  }

  findPSDEUILogicLinkCond(objKey: any): IPSDEUILogicLinkCond | null {
    return this.getPSModel5('dataentity.logic.IPSDEUILogicLinkCond', this.getPSDEUILogicLinkConds(), objKey) as IPSDEUILogicLinkCond;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get notMode(): boolean {
    return this.M.notMode != null ? this.M.notMode : false;
  }

  get cls(): string {
    return 'PSDEUILogicLinkGroupCondImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'dataentity.logic.IPSDEUILogicLinkGroupCond') return true;
    return super.instanceof(cls);
  }
}
